package com.qingfeng.provide.controller;

import com.qingfeng.core.dao.qingfeng.FaqDao;
import com.qingfeng.core.data.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @description: 常见问题
 * @author:LWY
 * @date: 2017/11/15 16:05
 * @modified:
 */
@RestController
@RequestMapping("/faq")
public class FaqController {
    @Autowired
    FaqDao faqDao;

    /**
     * 获取常见问题
     *
     * @return
     */
    @RequestMapping("/")
    public ResultData get() {
        List<Map<String, Object>> list = faqDao.get();
        return new ResultData(ResultData.SUCCESS, "获取数据成功", list);
    }
}
